package vmcs.boundary.listener;

import vmcs.controller.StoreController;
import java.awt.event.ItemListener;
import java.awt.*;
import java.awt.event.*;

public class DoorListener implements ItemListener {
  private StoreController  sctrl;

  public DoorListener(StoreController  st) {
    sctrl = st;
  }
  public void itemStateChanged(ItemEvent e) {
    /**@todo: Implement this java.awt.event.ActionListener method*/
   Checkbox    cb;

   cb = (Checkbox)e.getSource();

    System.out.println("DoorListener:" + cb.getState());
    // true: isOpen = false, false: isOpen = true;
    sctrl.setDoorState(cb.getState());
  }
}